package com.caocaog.market.finance.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.caocaog.market.finance.entity.MkBillHistory;
import com.caocaog.market.finance.entity.MkBillLine;
import com.caocaog.market.finance.entity.MkBillLineHistory;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * @author liguang
 * @version 1.0.0
 * @Project jeecg-boot
 * @Package com.caocaog.market.finance.mapper
 * @ClassName MkBillLineHistoryMapper.java
 * @createTime 2021年12月03日 19:22:00
 * @Description TODO
 */
public interface MkBillLineHistoryMapper extends EasyBaseMapper<MkBillLineHistory> {
    int insertBillLineAndHistory(@Param("billLines") List<MkBillLineHistory> billLineHistories);

    //插入时如果有异常，立即删除
    int deleteBillLineAndHistory(@Param("billLines") List<MkBillLineHistory> billLineHistories);

    /**
     * 仅商家app端使用
     * @param page
     * @param billLineHistory
     * @return
     */
    IPage<MkBillLineHistory> findForHistoryPage(Page<MkBillLineHistory> page, MkBillLineHistory billLineHistory);
}
